<style type="text/css">
  h1, h2 { display: block; width: 650px; font-size: 14px; font-weight: bold; margin: 5px 0px;}
  p { display: block; width: 650px; font-size: 12px; margin: 3px 0px;}
  hr { margin: 5px 0px;}
  table {width: 650px;}
</style>
<table cellspacing="0" cellpadding="0">
  <tr>
    <td>
      <img src="http://reduceri-cadouri.ro/images/mail-header.png" />
    </td>
  </tr>
  <?php foreach($offers as $site_offers): ?>
    <?php foreach($site_offers as $offer): ?>
      <tr>
        <td>
          <h2><a href="<?php echo $offer->getUrl() ?>"><?php echo $offer->getName() ?></a></h2>
          <p>
            Reducere: <?php echo $offer->getDiscountPercent() ?>%
            <?php if($expiration_time = $offer->getExpirationTime()): ?>
              Expira in <?php echo $expiration_time['hours'] ?> ore si <?php echo $expiration_time['minutes'] ?> minute
            <?php else: ?>
              Reducere expirata
            <?php endif; ?>
            Orase: <?php echo $offer->getCitiesString() ?>
          </p>
          <p style="color: #404040; font-size: 10px;"><?php echo nl2br(htmlspecialchars_decode($offer->getDescription())) ?></p>
          <p>
            <?php foreach($offer->getOfferImages() as $image): ?>
              <img src="http://reduceri-cadouri.ro/uploads/offers/small/<?php echo $image->getImage() ?>" />
            <?php endforeach; ?>
          </p>
        </td>
      </tr>
      <tr>
        <td style="height: 1px; background-color: #A0A0A0;"></td>
      </tr>
    <?php endforeach; ?>
  <?php endforeach; ?>
  </table>
  <p>Durata procesare oferte: <?php echo $time ?> sec.</p>
